package main

import "fmt"

func fool(a string, b int) int {
	fmt.Println("a = ", a)
	fmt.Println("b = ", b)
	c := 100
	return c
}

// 返回多个返回值，匿名的
func foo2(a string, b int) (int, int) {
	fmt.Println("a = ", a)
	fmt.Println("b = ", b)
	return 666, 777
}

func foo3(a string, b int )(r1 int, r2 int){
	fmt.Println("a = ", a)
	fmt.Println("b = ", b)
	r1 = 100
	r2 = 200
	return
}

func main() {
	c := fool("aa", 55)
	fmt.Println("c = ", c)

	r1, r2 := foo2("foo2", 100)
	fmt.Println("r1 = ", r1, "r2 = ", r2)

	r3, r4 := foo3("foo3", 99)
	fmt.Println("r3 = ", r3, "r4 = ", r4)
}
